#ifndef GRAPHICALCOMPOSITE_H_
#define GRAPHICALCOMPOSITE_H_

#include "GraphicalElement.h"

class GraphicalComposite : public GraphicalElement
{
public:
    GraphicalComposite();
    GraphicalComposite(long id);
    virtual ~GraphicalComposite();

    virtual void render(const Position& parent);
    virtual GraphicalElement* findChild(long idToFind);
    virtual void traverse(const Event& event);
    virtual void update(unsigned long tick);

    void addChild(GraphicalElement* element);
    void removeChild(long idToRemove, bool deleteIt);
    void eraseChildren();

private:
    typedef std::list<GraphicalElement*> Children;
    Children children;
};

#endif
